<?php

namespace Tictactoe\Ai\Exception;

use Tictactoe\Exception as Exception;
use Tictactoe\Ai\Population\Item as Item;

class EstimateWinner extends Exception
{
    /**
     * @var int
     */
    protected $forValue = 0;
    
    /**
     * @var array
     */
    protected $moves = array();
    
    /**
     * @var Item
     */
    protected $populationItem = null;
    
    public function getForValue() {
        return $this->forValue;
    }

    public function getMoves() {
        return $this->moves;
    }

    public function setForValue($forValue) {
        $this->forValue = $forValue;
    }

    public function clearMoves() {
        $this->moves = array();
    }
    
    public function addMove($x, $y) {
        $this->moves[] = array('x' => $x, 'y' => $y);
    }
    
    /**
     * @return Item
     */
    public function getPopulationItem() {
        return $this->populationItem;
    }

    /**
     * @param Item $populationItem
     */
    public function setPopulationItem(Item $populationItem) {
        $this->populationItem = $populationItem;
    }


    
}
